//
//  SandBoxPaths.m
//  Class_SandBox
//
//  Created by xalo on 16/3/7.
//  Copyright © 2016年 赵言. All rights reserved.
//

#import "SandBoxPaths.h"

@implementation SandBoxPaths

//获得documents文件夹路径
+ (NSString *)documentsPath{
    
    NSArray *documentsPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    return [documentsPaths objectAtIndex:0];
}

//获得library文件夹路径
+ (NSString *)libraryPath{
    
    NSArray *libraryPaths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
    return [libraryPaths objectAtIndex:0];
}

//获得library/caches文件夹路径
+ (NSString *)cachesPath{
    
    NSArray *cachesPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
    return [cachesPaths objectAtIndex:0];
}

//获得tmp文件夹路径
+ (NSString *)tmpPath{
    
    NSString *tmpPaths = NSTemporaryDirectory();
    return tmpPaths;
}


@end
